﻿<UserControl xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"  
             xmlns:my2="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.TwilightBlue"  
             xmlns:dataform="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"  
             xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"  
             xmlns:common="clr-namespace:System.Windows;assembly=System.Windows.Controls"
             x:Class="SharepointUpload.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <UserControl.Resources>
        <Storyboard x:Name="FadeIn">
            <DoubleAnimation
                Duration="00:00:02"
                From="0.00"
                To="1.00"
                Storyboard.TargetName="contentFields"
                Storyboard.TargetProperty="Opacity"/>
        </Storyboard>
        <Storyboard x:Name="FadeOut">
            <DoubleAnimation
                Duration="00:00:01"
                From="1.00"
                To="0.00"
                Storyboard.TargetName="contentFields"
                Storyboard.TargetProperty="Opacity"/>
        </Storyboard>
        <LinearGradientBrush x:Key="twilightGradient" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="#FFA3AEB9" Offset="0" />
            <GradientStop Color="#FF8399A9" Offset="0.375" />
            <GradientStop Color="#FF718597" Offset="0.375" />
            <GradientStop Color="#FF617584" Offset="1" />
        </LinearGradientBrush>
    </UserControl.Resources>
    <my2:TwilightBlueTheme>
    <Grid x:Name="LayoutRoot" Width="auto" Background="WhiteSmoke" HorizontalAlignment="Stretch">
         <Grid.RowDefinitions>
            <RowDefinition Height="55"/>
            <RowDefinition x:Name="contentTypeRow" Height="0"/>
            <RowDefinition x:Name="actionRow" Height="0"/>
            <RowDefinition Height="24"/>
            <RowDefinition x:Name="formLayoutRow" Height="*"/>
            </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition MinWidth="80" Width="200"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <controls:TreeView Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="siteMap" Grid.Row="0" Grid.Column="0" Grid.RowSpan="6" Background="Transparent" SelectedItemChanged="siteMap_SelectedItemChanged">
                <!-- build data template for tree view  -->
                <controls:TreeView.ItemTemplate>
                    <common:HierarchicalDataTemplate>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <!-- Image Grid.Column="0" Height="16" Margin="0"  Source="{Binding ImageUrl}"/ -->
                            <TextBlock Grid.Column="1" Foreground="Black" Margin="0" Text="{Binding Path=Title}" FontSize="12"/>
                        </Grid>
                    </common:HierarchicalDataTemplate>
                </controls:TreeView.ItemTemplate>
            </controls:TreeView>
            <controls:GridSplitter Grid.Column="1" Grid.Row="0" Grid.RowSpan="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
            <my:Label Grid.ColumnSpan="4" Foreground="white" Grid.Row="0" Grid.Column="2" FontFamily="Arial" FontSize="32" HorizontalAlignment="Right" Padding="10" Content="Breeze Upload">
            <my:Label.Effect>
                <DropShadowEffect ShadowDepth="2" Opacity="1" />
            </my:Label.Effect>
        </my:Label>
        <my:Label Foreground="Black" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Content="Content Type:" />
            <ComboBox Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="3" Height="23" HorizontalAlignment="Stretch" x:Name="selectContentType" VerticalAlignment="Top" SelectionChanged="selectContentType_SelectionChanged"> 
                <ComboBox.ItemTemplate>
                    <common:HierarchicalDataTemplate>
                        <TextBlock Foreground="Black" Margin="0" Text="{Binding Path=Name}" FontSize="12"/>
                    </common:HierarchicalDataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
            <my:Label x:Name="statusLbl" FontSize="16" Foreground="Black" Grid.Row="3" Grid.ColumnSpan="4" Grid.Column="2" FontWeight="Bold" HorizontalAlignment="Left">
            </my:Label>
            <Button x:Name="selectFilesBtn" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="2" Height="24" Width="100" Content="Select Files..." Click="Button_Click" HorizontalAlignment="Right" MaxWidth="125" />
        <Button x:Name="uploadBtn" Grid.Row="2" Grid.Column="5" Content="Upload Files" Height="24" Width="100" MaxWidth="125" Click="Button_Click_1" />
            <Button x:Name="addItemBtn" Grid.Row="2" Grid.Column="5" Content="Add Item" Height="24" Width="100" MaxWidth="125" Click="addItemBtn_Click" />
            <Border Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="4" Background="#fcfefe" BorderThickness="2" CornerRadius="5">
                <Border.BorderBrush>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Border.BorderBrush>
                <Grid x:Name="contentFields" Opacity="0.00" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" Margin="4">
                    <Grid.Background>
                        <ImageBrush Stretch="UniformToFill" ImageSource="formBG.jpg"/>
                    </Grid.Background>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition MinWidth="75" MaxWidth="150"/>
                        <ColumnDefinition MaxWidth="600"/>
                    </Grid.ColumnDefinitions>
                </Grid>
            </Border>
        </Grid>
    </my2:TwilightBlueTheme>
</UserControl>
